package com.dm.shop.dto;

import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @version 1.0
 * @author: Saiya Wang
 * @desc: TODO
 * @date: 2021/7/21 21:30
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderDTO {
    @Length(max = 100, message = "留言内容不能多余100字")
    private String message;

    @NotNull(message = "收货地址不能为空")
    private Integer aid;

    @NotNull(message = "商品id不能为空")
    private List<Integer> pids;

    @NotNull(message = "商品数量不能为空")
    private List<Integer> nums;

    @NotNull(message = "商品总价不能为空")
    private float amount;

    private Integer uid;
}
